import request from '@/utils/request'

// 查询维修保养记录列表
export function listRecord(query) {
  return request({
    url: '/car/record/list',
    method: 'get',
    params: query
  })
}

// 查询维修保养记录详细
export function getRecord(maintenanceRecordId) {
  return request({
    url: '/car/record/' + maintenanceRecordId,
    method: 'get'
  })
}

// 新增维修保养记录
export function addRecord(data) {
  return request({
    url: '/car/record',
    method: 'post',
    data: data
  })
}

// 修改维修保养记录
export function updateRecord(data) {
  return request({
    url: '/car/record',
    method: 'put',
    data: data
  })
}

// 删除维修保养记录
export function delRecord(maintenanceRecordId) {
  return request({
    url: '/car/record/' + maintenanceRecordId,
    method: 'delete'
  })
}
